package com.siruier.boss.ui.activity.main

import android.view.View
import com.siruier.boss.api.core.launchUI
import com.siruier.boss.api.core.toData
import com.siruier.boss.api.kaiKa
import com.siruier.boss.databinding.ActivityMainBinding
import com.siruier.boss.ui.activity.opencard.OpenCardCitySelectActivity
import com.siruier.boss.ui.api.ApiObserver
import com.siruier.boss.ui.base.BaseActivity
import com.siruier.boss.ui.ext.startActivityExt
import com.siruier.boss.ui.utils.Logger


class MainActivity : BaseActivity<ActivityMainBinding>() {
    override fun initView() {
        bindViewClick(vb.cbOpenCard, vb.cbOpenRecord)
    }

    override fun onClick(v: View?) {
        when (v) {
            vb.cbOpenCard -> {
                startActivityExt<OpenCardCitySelectActivity>()
//                launchUI({
//                    val citys = kaiKa.cityList().toData()
//                    Logger.e(citys.toString())
//                },ApiObserver())
            }
            vb.cbOpenRecord -> {

            }
        }
    }
}